﻿using System;
using System.ComponentModel.DataAnnotations;
using Yz.Base;

namespace Yz.Model.Entities
{
    /// <summary>
    /// 用户信息表
    /// </summary>
    public class User : UpdateEntity
    {
        /// <summary>
        /// 用户名（不作为登录名）
        /// </summary>
        [MaxLength(15)]
        public string UserName { get; set; } = "";
        /// <summary>
        /// 密码
        /// </summary>
        [MaxLength(60)]
        public string Password { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        [MaxLength(11)]
        public string Telephone { get; set; }
        /// <summary>
        /// qq
        /// </summary>
        [MaxLength(15)]
        public string QQ { get; set; }
        /// <summary>
        /// 用户状态
        /// </summary>
        public StatusType StatusType { get; set; } = StatusType.Enable;
        /// <summary>
        /// 用户头像
        /// </summary>
        [MaxLength(300)]
        public string UserPhoto { get; set; } = "";
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; } = DateTime.Now;
        /// <summary>
        /// 角色ID
        /// </summary>
        public virtual int RoleId { get; set; }
    }
}
